﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;

namespace PowerTriggersWcf
{
    public partial class HiddenForm : Form
    {
        public HiddenForm()
        {
            InitializeComponent();
        }

        private void HiddenForm_Load(object sender, EventArgs e)
        {
            //SystemEvents.EventsThreadShutdown += new EventHandler(PowerModeChangeProcessor.SystemEvents_EventsThreadShutdown);
            SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(PowerModeChangeProcessor.SystemEvents_PowerModeChanged);
        }

        private void HiddenForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            //SystemEvents.EventsThreadShutdown -= new EventHandler(PowerModeChangeProcessor.SystemEvents_EventsThreadShutdown);
            SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(PowerModeChangeProcessor.SystemEvents_PowerModeChanged);
        }
    }
}
